package com.aiyige.page.mediaslider.model;

public class Media {
    public static final int MEDIA_TYPE_PHOTO = 1;
    public static final int MEDIA_TYPE_VIDEO = 2;
    int type;
    String imageUrl;
    String videoUrl;
    String router;

    public Media() {
    }

    private Media(Builder builder) {
        setType(builder.type);
        setImageUrl(builder.imageUrl);
        setVideoUrl(builder.videoUrl);
        setRouter(builder.router);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getRouter() {
        return router;
    }

    public void setRouter(String router) {
        this.router = router;
    }

    public static final class Builder {
        private int type;
        private String imageUrl;
        private String videoUrl;
        private String router;

        private Builder() {
            type = MEDIA_TYPE_PHOTO;
            imageUrl = "";
            videoUrl = "";
            router = "";
        }

        public Builder type(int val) {
            type = val;
            return this;
        }

        public Builder imageUrl(String val) {
            imageUrl = val;
            return this;
        }

        public Builder videoUrl(String val) {
            videoUrl = val;
            return this;
        }

        public Builder router(String val) {
            router = val;
            return this;
        }

        public Media build() {
            return new Media(this);
        }
    }
}
